using UnityEngine;

namespace I2.Loc
{
	public class LanguagePopup : MonoBehaviour
	{
		public LanguageSource Source;

		private UIPopupList mList;

		private void Start()
		{
			mList = GetComponent<UIPopupList>();
			mList.items = Source.GetLanguages();
			EventDelegate.Add(mList.onChange, OnValueChange);
			mList.value = mList.items[0];
		}

		public void OnValueChange()
		{
			if (LocalizationManager.CurrentLanguage != mList.value)
			{
				LocalizationManager.CurrentLanguage = mList.value;
				SetShopProductLocalization();
				ManagerMissions.instance.LocalizeMissionText();
			}
		}

		private void SetShopProductLocalization()
		{
		}
	}
}
